package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPressureAverageReportsMapper;
import com.ruoyi.system.domain.DispatchPressureAverageReports;
import com.ruoyi.system.service.IDispatchPressureAverageReportsService;

/**
 * 压力均值报Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPressureAverageReportsServiceImpl implements IDispatchPressureAverageReportsService 
{
    @Autowired
    private DispatchPressureAverageReportsMapper dispatchPressureAverageReportsMapper;

    /**
     * 查询压力均值报
     * 
     * @param pressureAverageReportsId 压力均值报主键
     * @return 压力均值报
     */
    @Override
    public DispatchPressureAverageReports selectDispatchPressureAverageReportsByPressureAverageReportsId(Long pressureAverageReportsId)
    {
        return dispatchPressureAverageReportsMapper.selectDispatchPressureAverageReportsByPressureAverageReportsId(pressureAverageReportsId);
    }

    /**
     * 查询压力均值报列表
     * 
     * @param dispatchPressureAverageReports 压力均值报
     * @return 压力均值报
     */
    @Override
    public List<DispatchPressureAverageReports> selectDispatchPressureAverageReportsList(DispatchPressureAverageReports dispatchPressureAverageReports)
    {
        return dispatchPressureAverageReportsMapper.selectDispatchPressureAverageReportsList(dispatchPressureAverageReports);
    }

    /**
     * 新增压力均值报
     * 
     * @param dispatchPressureAverageReports 压力均值报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPressureAverageReports(DispatchPressureAverageReports dispatchPressureAverageReports)
    {
        return dispatchPressureAverageReportsMapper.insertDispatchPressureAverageReports(dispatchPressureAverageReports);
    }

    /**
     * 修改压力均值报
     * 
     * @param dispatchPressureAverageReports 压力均值报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPressureAverageReports(DispatchPressureAverageReports dispatchPressureAverageReports)
    {
        dispatchPressureAverageReports.setUpdateTime(DateUtils.getNowDate());
        return dispatchPressureAverageReportsMapper.updateDispatchPressureAverageReports(dispatchPressureAverageReports);
    }

    /**
     * 批量删除压力均值报
     * 
     * @param pressureAverageReportsIds 需要删除的压力均值报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureAverageReportsByPressureAverageReportsIds(Long[] pressureAverageReportsIds)
    {
        return dispatchPressureAverageReportsMapper.deleteDispatchPressureAverageReportsByPressureAverageReportsIds(pressureAverageReportsIds);
    }

    /**
     * 删除压力均值报信息
     * 
     * @param pressureAverageReportsId 压力均值报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureAverageReportsByPressureAverageReportsId(Long pressureAverageReportsId)
    {
        return dispatchPressureAverageReportsMapper.deleteDispatchPressureAverageReportsByPressureAverageReportsId(pressureAverageReportsId);
    }
}
